import { getAction, postAction } from '@/api/baseAPI'

/** 订单信息 */
// 分页查询订单信息
export const apiQueryOrderList = params => getAction('/back/order/page', params)
// 新增订单信息
export const apiSaveOrder = params => postAction('/back/order/save', params)
// 更新订单信息
export const apiUpdateOrder = (id, params) => postAction('/back/order/update/' + id, params)
// 按id查询订单信息
export const apiQueryOrderById = id => getAction('/back/order/' + id)
// 结束订单信息
export const apiFinishOrder = id => postAction('/back/order/finish/' + id)

/** 售后记录 */
// 分页查询售后记录
export const apiQueryAfterSaleList = params => getAction('/back/after-sale/page', params)
// 按id查询售后记录
export const apiQueryAfterSaleById = id => getAction('/back/after-sale/' + id)
// 新增售后记录
export const apiSaveAfterSale = params => postAction('/back/after-sale/save', params)
// 更新售后记录
export const apiUpdateAfterSale = (id, params) => postAction('/back/after-sale/update/' + id, params)
// 处理售后记录
export const apiProcessAfterSale = (id, params) => postAction('/back/after-sale/process/' + id, params)

/** 客户信息 */
// 分页查询客户信息
export const apiQueryCustomerList = params => getAction('/back/customer/page', params)
